"""Add OpenAI Base URL column to User Table

Revision ID: 3f6e32040035
Revises: 4e70c3318aaa
Create Date: 2024-08-07 11:29:08.782371

"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = "3f6e32040035"
down_revision: Union[str, None] = "4e70c3318aaa"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("user", schema=None) as batch_op:
        batch_op.add_column(sa.Column("openai_base_url", sa.String(), nullable=True))

    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("user", schema=None) as batch_op:
        batch_op.drop_column("openai_base_url")

    # ### end Alembic commands ###
